package com.csmarket.csmarketbackend.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

@Configuration
public class WebSocketConfig {

    /**
     * WebSocket端点注册器
     * 该Bean会自动注册所有使用@ServerEndpoint注解的端点
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter() {
        System.out.println("WebSocket端点注册器已创建");
        return new ServerEndpointExporter();
    }
}
